package DistSys;

/**
 * The class <code>CostSumCase</code> holds the information about one case. It\
 * is used by <code>CostSumDlg</code>.
 *
 */
public class CostSumCase {
    // Constants for case data
    public static final int DESCRIPTION      =  0;
    public static final int PRESENT_VALUE    =  1;
    public static final int CAPITAL_COST     =  2;
    public static final int OM_COST          =  3;
    public static final int TOTAL_LOSSES     =  4;
    public static final int TOTAL_POOR_RELIA =  5;

    public static final int ZONE             =  6;
    public static final int DISCOUNT_RATE    =  7;
    public static final int PROJECT_LIFE     =  8;
    public static final int LOSS_FACTOR      =  9;
    public static final int COST_OF_ENERGY   = 10;

    public static final int LINE_LOSSES      = 11;
    public static final int CABLE_LOSSES     = 12;
    public static final int WINDING_LOSSES   = 13;
    public static final int CORE_LOSSES      = 14;
    public static final int OTHER_LOSSES     = 15;

    public static final int MOMENT_INT_COST  = 16;
    public static final int SUST_INT_COST    = 17;
    public static final int VOLT_SAG_COST    = 18;

    public static final int COUNT            = 19;

    // The real data
    public String[] asData = new String[COUNT];
    public Template vTemplates[];

    public class Template {
        public static final int CAPITAL =  0;
        public static final int OM      =  1;
        public static final int COUNT   =  2;

        public String sName;
        public String[] asCost = new String[COUNT];
        public String[] asCount = new String[COUNT];
    };

    // Initializes CostSumCase object.
    public CostSumCase() {
        for (int i = 0; i < COUNT; i++)
            asData[i] = null;
        vTemplates = null;
    }

    // Initializes a given count of Template objects.
    public void InitTemplates(int iTemplCount) {
        vTemplates = new Template[iTemplCount];
        for (int i = 0; i < iTemplCount; i++)
            vTemplates[i] = new Template();
    }
}